<template>
  <transition>
  <div class="store-management">
    <section class="app-main">
      <mt-cell class="staff-details" title="角色管理" is-link to="/store-role-list"></mt-cell>
      <mt-cell class="staff-details" title="员工管理" is-link to="/store-add-user"></mt-cell>
    </section>
  </div>
    </transition>
</template>

<script>
  import { Header,Cell,Toast} from 'mint-ui';

//  Vue.component(Header.name, Header);
export default {
  components:{
    Header,
    Cell,
  },
  data () {
    return {
      shopKeeper:'',
    }
  },

  mounted(){

    var params = new URLSearchParams();
    this.$axios({
      method: 'post',
      url:'gp/users/getUserInfo',
      data:params
    }).then((res)=>{
      if(res.data.statusCode==200){

      this.shopKeeper=res.data.object.shopKeeper;
      console.log(res,11111)
      if(this.shopKeeper==0){
        Toast({
          message: '不好意思，您暂无操作权限',
          position: 'middle',
          duration:500
        });

        setTimeout(()=>{
          this.$router.push({path:'/member-center'})
      },500)

      }
    }else{
      Toast({
        message: res.data.message,
        position: 'middle',
        duration:500
      });
    }
  })
  },
  methods:{
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->

<style>
  .store-management .member-header {
    background: #fff;
    position: relative;
    margin: 0 0 12px;
    padding:12px; }
  .store-management .member-header .store-code{
    position: absolute;
    top:50%;
    right:16px;
    font-size:28px ;
    color: #c34853;
    font-weight: bold;
    transform: translate(0,-50%);
  }
  .store-management .user-img {
    display: inline-block;
    vertical-align: middle; }
  .store-management .user-img img {
    width:70px;
    height:70px; }
  .store-management .user-info {
    display: inline-block;
    vertical-align: middle;
    padding-left:8px; }
  .store-management .user-title {
    display: block;
    margin: 0 0 2px;
    font-size:16px;
    color: #000; }
  .store-management .user-mendian {
    display: block;
    font-size:14px;
    color: #888; }
  .store-management .staff-details{
    margin:0 0 10px;
  }
</style>
